home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 35 / 035.d81 / disk lock (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  3KB  |  109 lines

  1. 5 gosub60100:clr
  2. 20 poke53280,6:poke53281,0:restore
  3. 22 print"[147][158]              [196]isk [204]ocker"
  4. 24 print"            by [210]uth [193]. [200]icks"
  5. 30 for i=0 to 4:read f$(i):next:ct=0
  6. 40 data del,seq,prg,usr,rel
  7. 50 for i=0 to 4:read l$(i):next
  8. 60 data del<,seq<,prg<,usr<,rel<
  9. 70 t=18:s=1
  10. 80 print"         [196] [154]- [204]ock a whole disk"
  11. 82 print"         [198] [154]- [204]ock one file"
  12. 84 print"         [209] [154]- [209]uit this program"
  13. 88 print"         [208]ress [196][154], [198][154], or [209][154]."
  14. 90 getq$:ifq$=""then90
  15. 92 ifq$="d"orq$="[196]"then100
  16. 94 ifq$="f"orq$="[198]"then100
  17. 96 ifq$="q"orq$="[209]"thenmm=.:gosub60000:goto90
  18. 99 goto90
  19. 100 mm=1:print"[201]nsert disk to be locked in drive and"
  20. 105 print"press [211][208][193][195][197]."
  21. 106 geta$:ifa$<>" "then106
  22. 120 print"[147]":print tab(4)" # ";tab(8)" [196]irectory [206]ame ";tab(27)" [198]ile [146]"
  23. 125 print
  24. 130 open 15,8,15
  25. 140 print#15,"i0"
  26. 150 input#15,en,em$,et,es
  27. 160 if en<>0 then print"      dos error":goto 1050
  28. 170 open 7,8,7,"#0"
  29. 180 print#15,"u1"7;0;t;s
  30. 190 input#15,en,em$,et,es
  31. 200 if en<>0 then print"      dos error":goto 1000
  32. 210 print#15,"m-r";chr$(0);chr$(3);chr$(255)
  33. 220 bt=t:bs=s
  34. 230 print#15,"b-p";7;0
  35. 240 get#7,t$
  36. 250 if t$="" then t$=chr$(0)
  37. 260 get#7,s$
  38. 270 if s$="" then s$=chr$(0)
  39. 280 t=asc(t$):s=asc(s$)
  40. 300 for i=0 to 7
  41. 310 print#15,"b-p";7;2+b
  42. 320 get#7,b$
  43. 330 for j=0 to 4
  44. 340 if b$=chr$(128+j) then b$=f$(j):j=4
  45. 350 if b$=chr$(192+j) then b$=l$(j):j=4
  46. 360 next j
  47. 500 print#15,"b-p";7;5+b
  48. 510 for k=0 to 15
  49. 520 get#7,c$
  50. 530 if c$="" then c$=chr$(0)
  51. 540 c=asc(c$)
  52. 550 if c$=chr$(0) then e=e+1
  53. 560 if c>31 and c<91 then cc$=cc$+c$
  54. 570 if e=16 and t=0 then k=15:goto 990
  55. 580 next k
  56. 590 ct=ct+1
  57. 800 print tab(4)ct;tab(8)cc$;tab(28)b$:cc$=chr$(0):e=0:d$=b$:b$=chr$(0)
  58. 810 if q$="f" then gosub 2000
  59. 820 if q$="d" then gosub 2030
  60. 830 b=b+32
  61. 840 next i
  62. 850 if t<>0 then b=0:goto 180
  63. 990 if q$="d" then q$=chr$(0):b=0:t=bt:s=bs:goto 180
  64. 1000 close 7
  65. 1010 input#15,en,em$,et,es
  66. 1050 close 15
  67. 1060 if en<>0 then print:print:print en,em$,et,es
  68. 1070 print"[158]    [197]nd [207]f [196]irectory ... [208]ress [211][208][193][195][197]":poke198,.
  69. 1080 geta$:ifa$<>" "then1080
  70. 1090 goto20
  71. 2000 print tab(5)"[154][195]hange this file? ([217][154]/[206][154]/[209][154])":poke198,.
  72. 2005 geta$:ifa$<>"n"anda$<>"y"anda$<>"[206]"anda$<>"[217]"anda$<>"q"anda$<>"[209]"then2005
  73. 2010 ifa$="n"ora$="[206]"then return
  74. 2020 ifa$="q"ora$="[209]"thengosub60000:if(ab)thenclose7:close15:goto20
  75. 2030 for j=0 to 4
  76. 2040 if d$=f$(j) then d$=chr$(192+j):j=4
  77. 2050 if d$=l$(j) then d$=chr$(128+j):j=4
  78. 2060 next j
  79. 2070 print#15,"b-p";7;2+b
  80. 2080 print#7,d$;
  81. 2090 print#15,"u2"7;0;bt;bs
  82. 3000 if en<>00 then print:print"  disk  error"en,em$,et,es:goto 1000
  83. 3010 print#15,"b-p";7;5+b
  84. 3020 return
  85. 60000 ab=.:print"  [154][193]re you sure you want to quit? ([217][154]/[206][154])":poke198,.
  86. 60010 geta$:ifa$<>"n"anda$<>"[206]"anda$<>"y"anda$<>"[217]"then60010
  87. 60020 ifa$="y"ora$="[217]"thenab=1:goto60040
  88. 60030 print"[145]                                      [145][145]":return
  89. 60040 if(mm)thenreturn
  90. 60045 close15:open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
  91. 60050 ifer<>63thenend
  92. 60060 load"hello connect",8
  93. 60100 poke53280,6:poke53281,3
  94. 60110 print"[147][176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]";
  95. 60120 fora=1to23:print"[221]"spc(38)"[221]";:next
  96. 60130 print"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189][157][148][192]"
  97. 60140 print"[149]          [204][207][193][196][211][212][193][210] [208]resents:"
  98. 60145 print"                            [146]          ";
  99. 60150 print"             [196]isk [204]ocker    [154] [146]         ";
  100. 60155 print"                            [154] [146]         ";
  101. 60160 print"             [194]y [210]uth [200]icks  [154] [146]         ";
  102. 60165 print"                            [154] [146]         ";
  103. 60170 print"           ([195])opyright 1987 [154] [146]         ";
  104. 60172 print"                            [154] [146]         ";
  105. 60175 print"           [154]                  [146]"
  106. 60180 print"[149]        [208]ress [211][208][193][195][197] to continue."
  107. 60190 geta$:ifa$<>" "then60190
  108. 60195 return
  109.